import request from "@/utils/request";

// 查询教学实验环境实例列表
export function listExample(query) {
  return request({
    url: "/experiment/example/list",
    method: "get",
    params: query,
  });
}

// 查询教学实验环境实例详细
export function getExample(teachingEnvironmentExampleId) {
  return request({
    url: "/experiment/example/" + teachingEnvironmentExampleId,
    method: "get",
  });
}

// 新增教学实验环境实例
export function addExample(data) {
  return request({
    url: "/experiment/example",
    method: "post",
    data: data,
  });
}

// 修改教学实验环境实例
export function updateExample(data) {
  return request({
    url: "/experiment/example",
    method: "put",
    data: data,
  });
}

// 删除教学实验环境实例
export function delExample(teachingEnvironmentExampleId) {
  return request({
    url: "/experiment/example/" + teachingEnvironmentExampleId,
    method: "delete",
  });
}

// 重做实验
export function resetExperiment(teeId) {
  return request({
    url: "/experiment/example/resetExperiment/" + teeId,
    method: "get",
  });
}

// 结束实验
export function endExperiment(teeId) {
  return request({
    url: "/experiment/example/endExperiment/" + teeId,
    method: "get",
  });
}

// 增加实验时间
export function addExperimentTime(teeId) {
  return request({
    url: "/experiment/example/addExperimentTime/" + teeId,
    method: "get",
  });
}
